<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddCraftsmanColumns extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('craftmans', function (Blueprint $table) {
            $table->string('province')->comment('省');
            $table->string('city')->comment('市');
            $table->string('area')->comment('区');
            $table->string('street')->comment('街道');
            $table->string('hope_province')->comment('期望工作省');
            $table->string('hope_city')->comment('期望工作市');
            $table->float('lng',9,6)->comment('经度');
            $table->float('lat',9,6)->comment('维度');
            $table->string('headman_images')->comment('班组长图片');
            $table->removeColumn('images');
            $table->tinyInteger('seniority')->comment('工龄');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('craftmans', function (Blueprint $table) {
            //
        });
    }
}
